1. Field of the Invention
The present invention relates to an image processing apparatus capable of communicating with a plurality of host computers, and a method of controlling the image processing apparatus.
2. Description of the Related Art
Conventionally, there has been proposed a wireless USB formed by making USB wireless which is one of standards used in a personal computer (PC) environment as an interface for connection to peripheral devices.
In wireless USB communication, simultaneous communication cannot be made between a plurality of host apparatuses (e.g. PCs) and a single printer, but communication is made only between a single host apparatus and a single printer. This is stipulated in a wireless USB specification (Wireless USB Specification Rev. 1.0).
A description will be given of an outline of connection establishment performed between a host apparatus (e.g. PC) and a device (image forming apparatus such as a printer) for one-to-one wireless USB communication, with reference to FIG. 13.
FIG. 13 is a diagram useful in explaining an example of a system for performing wireless USB communication between a host apparatus 10 having a wireless USB antenna 101 and a device 20 having a wireless USB antenna 102.
When the host apparatus 10 creates a print job by an application and desires to transmit a print request to the device 20, the host apparatus 10 first transmits a beacon. In the beacon, as shown in FIG. 14, a host ID 201 unique to the host apparatus 10 and a device ID 202 unique to the device 20 are described.
The device 20, which has received the beacon of this print request, starts a one-to-one connection process for establishing communication. First, the device 20 checks whether or not the device ID 202 in the beacon received from the host apparatus 10 is identical to the device ID of its own, and if the device IDs differ, discards the beacon.
If the device ID 202 in the beacon received from the host apparatus 10 is identical to the device ID of its own, the device 20 checks whether or not the host ID 201 in the beacon is identical to one of host IDs which are registered in the device 20 by association. Then, if the host ID 201 in the beacon is an unregistered host ID, the device 20 determines that the host apparatus 10 is a host apparatus with which association of the device 20 is not set yet, and discards the beacon.
It should be noted that the term “association” refers to a relationship between a host apparatus and a device in which a CC (Connection Context) composed of a host ID, a device ID, and a connection Key is shared between the host apparatus and the device, and the relationship is set by an initial connection process required to be performed only once when installing a wireless USB device.
Next, if the host ID 201 in the beacon is a registered host ID, the device 20 transmits a connection request to the host apparatus 10. It should be noted that it is impossible to transmit a connection request from a host apparatus side to a device side due to the wireless USB specification.
When the host apparatus 10 permits connection requested by the device 20, the host apparatus 10 transmits spooled print data to the device 20. Upon completion of the transmission of the print data, the host apparatus 10 transmits a disconnection request to avoid occupying the device 20. This disconnection request can be transmitted from either of the host and the device.
As described above, the connection establishment for one-to-one wireless USB communication is performed. However, in the case of an environment where a plurality of host apparatuses share a single device, there occurs the following problem:
When the device receives a print request via a beacon from a host apparatus, the device is occupied by the host apparatus and unable to receive a print request from other host apparatuses during reception of the print data, so that there is a possibility that a print job to be processed next is not necessarily be executed in order.
As a solution to such problem, there has been proposed a system where host information is listed in a device based on beacons received from a plurality of host apparatuses and connection requests are transmitted to the host apparatuses in the listed order (Japanese Patent Laid-Open Publication No. 2007-251851).
A description will be given with reference to FIGS. 15 to 17. FIG. 15 shows host PCs 10a to 10c and a device 20. The host PC 10a transmits beacons 301a and 302a to the device 20, the host PC 10b transmits a beacon 301b to the device 20, and the host PC 10c transmits a beacon 301c to the device 20.
When viewed from the device 20, the beacon 301a is for a first job, the beacon 302a is for a second job, the beacon 301b is for a third job, and the beacon 301c is for a fourth job.
A host ID list 401 shown in FIG. 16 is a list of host PCs stored in an internal memory of the device 20 and is comprised of a number column 402 and a host name column 403.
Upon receipt of each beacon, the device 20 registers host information in the host ID list 401 in the order of receipt. The number column 402 of the host ID list 401 indicates an order in which the beacons were received from the host PCs, and at the same time, an order in which connection requests are to be transmitted to the host PCs.
FIG. 17 is a flowchart showing a process performed by the device 20 following the order of the host ID list 401.
In FIG. 17, a part of the process for the first job includes sending a connection request to the host PC 10a (501), receiving print data reception from the host PC 10a (502), and sending a disconnection request to the host PC 10a (503). A part of the process for the second job (504 to 506), a part of the process for the third job (507 to 509), and a part of the process for the fourth job (510 to 512) are performed in a similar manner to the part of the process for the first job.
In an environment where a plurality of host PCs share a single device, such a wireless USB communication system makes it possible for the device to process print jobs in an order following the order of print requests from the plurality of host PCs.
In the wireless USB communication, simultaneous communication cannot be made between a plurality of host PCs and a single device, and wireless communication is made only between a single host PC and a single device.
Therefore, for example, when wireless communication is performed between a host PC and a device, if an error occurs due to e.g. disconnection of the communication caused by an obstacle, there is a possibility that the host PC cannot immediately reconnect to the device even though attempting to do so. In other words, if another host PC that transmitted a beacon during the disconnection has been connected to the device, reconnection to the host PC from which the communication was disconnected cannot be performed until the communication between the newly-connected host PC and the device is terminated.